<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>分类</title>
    <link type="text/css" rel="stylesheet" href="../css/more.css" />
    <script src="../lib/zepto.dev.js"></script>
    <script>
        $(function() {
            var user = localStorage.getItem("user");
            if (user) {
                $(".exit").html("退出登录");
            }

            $(".exit").tap(function() {
                if (user) {
                    localStorage.removeItem("user");
                    location.reload();
                } else {
                    location.href = "login.html";
                }
            });

            //购物小圆点
            refresh();
            function refresh() {
                var cart = localStorage.getItem("cart") ? JSON.parse(localStorage.getItem("cart")) : [],
                    totalNum = 0;

                if (cart.length) {
                    cart.map(function(item) {
                        totalNum += parseInt(item.num);
                    });
                    if (!$('.cart span').hasClass("gou")) {
                        $("<span class='gou'></span>").appendTo(".cart a");
                    }
                    $('.gou').html(totalNum);
                } else {
                    $(".gou").remove();
                }
            }
        });
    </script>
</head>
<body>
<header class="header">
    <a class="al" href="javascript:history.go(-1);">
        <img src="../img/return.png"/>
        <span></span>
    </a>
    <h1 class="title">更多</h1>
</header>
<div class="content">
    <div class="wrap">
        <ul class="list set">
            <li>
                <span>常见问题</span>
                <img src="../img/left.png"/>
            </li>
            <li>
                <span>系统设置</span>
                <img src="../img/left.png"/>
            </li>
            <li>
                <span>软件更新</span>
                <img src="../img/left.png"/>
            </li>
            <li>
                <span>扫描二维码</span>
                <img src="../img/left.png"/>
            </li>
            <span class="left"></span>
            <span class="right"></span>
        </ul>

        <ul class="list argu">
            <li>
                <span>我要提意见</span>
                <img src="../img/left.png"/>
            </li>
            <li>
                <span>关于</span>
                <img src="../img/left.png"/>
            </li>
            <span class="left"></span>
            <span class="right"></span>
        </ul>

        <a href="#" class="exit">登录</a>
    </div>
</div>
<ul class="tabs">
    <li class="tab">
        <a href="../index.html">
            <img src="../img/home.png" style="width: 0.48rem; height: 0.51rem;"/>
            <span>首页</span>
        </a>
    </li>
    <li class="tab">
        <a href="category.html">
            <img src="../img/category.png" style="width: 0.44rem; height: 0.43rem;"/>
            <span>分类</span>
        </a>
    </li>
    <li class="tab cart">
        <a href="myCart.html">
            <img src="../img/cart.png" style="width: 0.48rem; height: 0.43rem;"/>
            <span>购物车</span>
        </a>
    </li>
    <li class="tab">
        <a href="myShow.html">
            <img src="../img/mine.png" style="width: 0.47rem; height: 0.45rem;"/>
            <span>我的秀</span>
        </a>
    </li>
    <li class="tab active">
        <a href="more.html">
            <img src="../img/more.png" style="width: 0.46rem; height: 0.43rem;"/>
            <span>更多</span>
        </a>
    </li>
</ul>

</body>
</html>